package com.asistencia.businness;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

import com.asistencia.dao.interfaces.TypeCourseDao;
import com.asistencia.domain.TypeCourse;

@Service
public class TypeCourseBusinness {
	
@Autowired
private TypeCourseDao typecourseDao;
		
	
@Autowired
private TypeCourse typecourse;

public List<TypeCourse> listAll() {
	try{
		typecourseDao.listAll();
		List<TypeCourse> typeCo=typecourseDao.listAll();
		return typeCo;
	}catch (DataAccessException e){
		e.printStackTrace();
		return null;
	} catch(Exception e){
		e.printStackTrace();
		return null;
	}
}
public TypeCourse getById(Integer idTypeCourse){
	try{
		typecourse=typecourseDao.getById(idTypeCourse);
		return typecourse;
	}catch (DataAccessException e){
		e.printStackTrace();
		return null;
	}
}}

